package cn.huangsm.advance.ratelimiter2.utils;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * @author huang
 * @PACKAGE_NAME cn.huangsm.advance.ratelimiter2.utils
 * @PROJECT_NAME advance-code
 * @date 2019/1/19
 */
@Data
@AllArgsConstructor
public class Result {
    private Integer status;
    private String msg;
    private List<Object> data;

    public static Result OK(String msg, List<Object> data) {
        return new Result(200, msg, data);
    }

    public static Result ERROR(Integer status, String msg) {
        return new Result(status, msg, null);
    }
}
